package com.nisco.dms.repository;


import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

import com.nisco.dms.entity.RolePermission;

public interface RolePermissionDao extends JpaRepository<RolePermission, String> 
{
	@Modifying
	@Query(value="delete from Ds_Role_Permission  where roleId=?1 and strPermission=?2",nativeQuery = true)
	public void deleRolePermissionByRoleId(String roleId,String strPermission);
	
	RolePermission findByRoleIdAndStrPermission(String roleId,String strPermission);
	
	List<RolePermission> findByRoleId(String roleId);
}
